function generate_delta_CI_bootstrap(bsimax,sample,rule,wave,tcost,covariate,winter_prevuse,SMC,savedir,fbase)
% This function bootstraps the confidence intervals for the difference
% between EWM point estimate and the scaled ATT.  

% Inputs: 
% (1) bsimax: number of bootstrap runs
% (2) sample: cross-sectional dataset with electricity consumption, 
% covariates, and propensity scores
% (3) rule: = quadrant or cubic 
% (4) wave: indicates whether the output is wave-specific (=3,6,or 7) or
% for the pooled sample (=0)
% (5) tcost: private marginal cost of implementing the program per household
%  >0 represents cost savings; =0 represents kWh reduction 
% (6) covariate: indicates covariate for analysis: income, size, vintage,
% minimum of baseline consumption, maximum of baseline consumption, or
% standard deviation of consumption
% (7) winter_prevuse: indicates whether baseline consumption is calculated 
% as the mean of consumption in winter months (Jan and Feb) or as the mean
% of specified pre-treatment periods.
% (8) SMC: =1 use social marginal cost; =0 use retail electricity price
% (9) savedir: directory to save the savings table 
% (10) fbase: string used to indicate the propensity score and baseline
% months specification for output table 

% Output: 
% No direct output. All relevant parameters are saved as matfiles. 

%% 
if rule=="quadrant"
    generate_delta_CI_bootstrap_quadrant(bsimax,sample,wave,tcost,covariate,winter_prevuse,SMC,savedir,fbase)
elseif rule=="cubic"
    generate_delta_CI_bootstrap_cubic(bsimax,sample,wave,tcost,covariate,winter_prevuse,SMC,savedir,fbase)
end
end